﻿using System;
using System.Collections.Generic;
using System.Linq; 
using T.FAS.Runtime.DataModel.Dao;
using T.FAS.Runtime.Metadata.Entity.DataModel;
using T.FAS.Runtime.Metadata.SPI;
using T.FAS.Runtime.Metadata.Entity;
using T.FAS.Runtime.Base.Entity;

namespace T.FAS.Runtime.DataModel.Plugin
{
    /// <summary>
    /// DataObject MySQL Builder
    /// </summary>
    public class DataObjectSQLBuilderFactory : IBusinessSQLBuilderFactory
    {
        public IMetaBusinessSQLBuilder GetBusinessSQLBuilder(DatabaseType dBType)
        {
            if (dBType == DatabaseType.SQLServer)
                return new DataObjectMSSQLBuilder();
            else if (dBType == DatabaseType.MySQL)
                return new DataObjectMySQLBuilder();
            else if (dBType == DatabaseType.PostgreSQL)
                return new DataObjectPostgresSQLBuilder();
            else
                return default;
        }
    }
}
